package com.jared.crowd.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.jared.crowd.entity.Auth;
import com.jared.crowd.entity.AuthExample;

public interface AuthMapper {
	int countByExample(AuthExample example);

	int deleteByExample(AuthExample example);

	int deleteByPrimaryKey(Integer id);

	int insert(Auth record);

	int insertSelective(Auth record);

	List<Auth> selectByExample(AuthExample example);

	Auth selectByPrimaryKey(Integer id);

	int updateByExampleSelective(@Param("record") Auth record, @Param("example") AuthExample example);

	int updateByExample(@Param("record") Auth record, @Param("example") AuthExample example);

	int updateByPrimaryKeySelective(Auth record);

	int updateByPrimaryKey(Auth record);

	List<Integer> getAssignedAuthIdByRoleId(Integer roleId);

	void deleteOldRelationship(Integer roleId);

	void insertNewRelationship(@Param("roleId") Integer roleId, @Param("authIdList") List<Integer> authIdList);

	List<String> selectAssignedAuthNameByAdminId(Integer adminId);
}